const state ={
  menuItems:{},
}
const getters ={
  getMenuItems : state => state.menuItems
}
const mutations = {
   //改变属性的状态
    setMenuItems(state,data){
    state.menuItems = data
  },
  //将匹配到的对象在menu 数组中删除
  removeMenuItems(state,data){
  state.menuItems.forEach((item,index) => {
    if(item == data){
      state.menuItems.splice(index,1);
    }
  });
},
  pushToMenuItems(state,data){
  state.menuItems.push(data)
}
}
const actions = {

}

export default{
  state,
  getters,
  mutations,
  actions   

}